<template>
	<view class="container">
		<view class="tui-page__hd">
			<view class="tui-page__title">Waterfall</view>
			<view class="tui-page__desc">瀑布流，目前列数支持最大值为2。App端建议使用weex的waterfall组件，使用案例详见：ThorUI组件库->pages->index->productNvue</view>
		</view>
		<view class="tui-page__bd tui-page__spacing">
			<tui-button type="gray-primary" :size="34" bold width="372rpx" height="84rpx" margin="40rpx auto" @click="waterfall(0)">伪瀑布流</tui-button>
			<tui-button type="gray-primary" :size="34" bold width="372rpx" height="84rpx" margin="40rpx auto" @click="waterfall(1)">计算列高度</tui-button>
			<tui-button type="gray-primary" :size="34" bold width="372rpx" height="84rpx" margin="40rpx auto" @click="waterfall(2)">大图和列表切换</tui-button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	methods: {
		waterfall(type) {
			let url = '../waterfall-fake/waterfall-fake';
			if (type == 1) {
				url = '../waterfall-real/waterfall-real';
			} else if (type == 2) {
				url = '../waterfall-switch/waterfall-switch';
			}
			this.tui.href(url);
		}
	}
};
</script>

<style></style>
